#include<bits/stdc++.h>
using namespace std;
int n,r[100100];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>r[i];
	}
	sort(r,r+n);
	int k=0;
	for(int i=0;i<n;i++){
		if(r[i]>r[k]){
			k++;
		}
	}
	cout<<n-k<<endl;
}
//shirenwochi
